<?php
//////////////////////////////////////
// Class Registration System 		//
// CPSC 462				      		//
// Textbook Info Page         		//
// Trent Robbins & Richard Heywood  //
//////////////////////////////////////

date_default_timezone_set('America/New_York');
include('Website.class.php');
$css = '';
$js = '';
$body = '';
$studId = $_GET['studId'];
$page = new Website();
$page->dbConnect();
$ISBN = $_GET['isbn'];

list($title,$author,$edition,$amzLink) = $page->getTextbookInfo($ISBN);

$body .= "<table>
			<tr>
				<td rowspan=6 class='pic'>
					<img src='./pics/textbooks/{$ISBN}.jpg' alt='Textbook Picture'/><br /><br />
				</td>
				<td rowspan=6>
					Title:<br />
				
					Author:<br />
				
					Edition:<br />
					
					ISBN:<br />
					
					Amazon.com Link:<br />
				
				</td>
				<td rowspan=6>
					$title<br />
					
					$author<br />
					
					$edition<br />
					
					$ISBN<br />
					
					$amzLink<br />
				</td>
			</tr>
		 </table><br />";
		 
$body .= "<input type='button' value='Return to Courses List' onclick='window.close()'/>";

$page->createPage('Text Book Information',$css,$js,$body);
$page->dbCloseConnect();

?>